package com.yunqiao.service.api.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 评价
 *
 * @author Crocutax
 * @email wangxw725@163.com
 * @date 2019-03-03 21:58:45
 */
@TableName("tb_evaluate")
@Data
@ApiModel(value = "评价对象")
public class EvaluateEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @TableId
    @ApiModelProperty(value = "",hidden = true)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 评价者ID
     */
    @ApiModelProperty(value = "评价者ID")
    private Integer userId;
    /**
     * 被评价者ID
     */
    @ApiModelProperty(value = "被评价者ID")
    private Integer targetUserId;
    /**
     * 订单ID
     */
    @ApiModelProperty(value = "订单ID")
    private Integer orderId;
    /**
     * 1：好评 2 中评 3 差评
     */
    @ApiModelProperty(value = "1：好评 2 中评 3 差评 ")
    private Integer rank;
    /**
     * 1司机评价货主-2货主评价司机
     */
    @ApiModelProperty(value = "1司机评价货主-2货主评价司机",allowableValues = "1,2")
    private Integer type;
    /**
     * 评分
     */
    @ApiModelProperty(value = "评分")
    private Double score;
    /**
     * 内容
     */
    @ApiModelProperty(value = "内容")
    private String content;
    /**
     * 1:已删除， 2：未删除
     */
    @ApiModelProperty(value = "1:已删除， 2：未删除")
    private Integer deleteType;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间",hidden = true)
    private Date createTime;
    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间",hidden = true)
    private Date updateTime;
    /**
     * 软删除
     */
    @TableLogic
    @JsonIgnore
    @ApiModelProperty(value = "软删除" , hidden = true)
    private Integer deleted;

}
